<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> 
	<head>
		<title></title>
	</head>
	<body>
		<div id="contentContainer" width="100%" height="100%" style="margin: 15px;">
		
			<div th:replace="fragment/admin_content_query_form"></div>
			 
			<!-- 按钮 -->
		 	<div style="margin-bottom: 10px;margin-top: 20px;">
		 		<Button-group>
			        <i-button type="ghost"  v-on:click="doAddButton()"><Icon type="ios-download-outline"></Icon> 新增</i-button>
			    	<i-button type="ghost"  v-on:click="doUpdateButton()"><Icon type="ios-download-outline"></Icon> 修改</i-button>
			    	<i-button type="ghost"  v-on:click="doDeleteButton()"><Icon type="ios-download-outline"></Icon> 删除</i-button>
			    </Button-group>
			</div>
			
			<div th:replace="fragment/admin_content_table"></div>
			
			<!-- 新增 -->
	    	<Modal width="600" v-model="vueAddModalVisible" :styles="{top: '80px'}" title="增加权限">
		       	<i-form ref="vueAddForm" :model="vueAddForm" :rules="vueAddFormRules" :label-width="80">
			        <Form-item label="名称" prop="name">
			            <i-input v-model="vueAddForm.name" placeholder="请输入名称"></i-input>
			        </Form-item>
			        <Form-item label="上级节点" prop="parentId">
			            <Input-number :max="9999" :min="0"  v-model="vueAddForm.parentId" style="width: 100%"></Input-number>
			        </Form-item>
			        <Form-item label="映射链接" prop="url">
			            <i-input v-model="vueAddForm.url" placeholder="请输入映射链接"></i-input>
			        </Form-item>
			        <Form-item label="映射行为" prop="action">
			            <i-input v-model="vueAddForm.action" placeholder="请输入映射行为"></i-input>
			        </Form-item>
			        <Form-item label="分组" prop="group">
			        	<i-input v-model="vueAddForm.group" placeholder="请输入分组信息"></i-input>
			        </Form-item>
			        <Form-item label="排序" prop="sort">
			        	<Input-number :max="9999" :min="0" v-model="vueAddForm.sort" style="width: 100%"></Input-number>
			        </Form-item>
			        <Form-item label="资源类型" prop="resourceType">
			        	<Radio-group v-model="vueAddForm.resourceType" type="button">
					        <Radio label="menu"><span>菜单</span></Radio>
					        <Radio label="button"><span>按钮</span></Radio>
					    </Radio-group>
			        </Form-item>
			        <Form-item label="可用状态" prop="available">
					    <i-switch v-model="vueAddForm.available" size="large">
						    <span slot="open">启用</span>
						    <span slot="close">弃用</span>
						</i-switch>
			        </Form-item>
			    </i-form>
		    	<!-- 自定义 modal 底部按钮 -->
			    <div slot="footer">
			     	<i-button type="primary"  v-on:click="submitAddForm()">提交</i-button>
		            <i-button type="primary"  v-on:click="resetVueFormData('vueAddForm')"  style="margin-left: 8px">重置</i-button>
		            <i-button type="primary"  v-on:click="vueAddModalVisible = false"  style="margin-left: 8px">取消</i-button>
		        </div>
	    	</Modal>
	    	
	    	<!-- 复制 -->
            <Modal width="600" v-model="vueCopyModalVisible" :styles="{top:'50px'}" title="复制权限">
                <i-form ref="vueCopyForm" :model="vueCopyForm" :rules="vueCopyFormRules" :label-width="80">
                    <Form-item label="名称" prop="name">
			            <i-input v-model="vueCopyForm.name" placeholder="请输入名称"></i-input>
			        </Form-item>
			        <Form-item label="上级节点" prop="parentId">
			            <Input-number :max="9999" :min="0" v-model="vueCopyForm.parentId" style="width: 100%"></Input-number>
			        </Form-item>
			        <Form-item label="映射链接" prop="url">
			            <i-input v-model="vueCopyForm.url" placeholder="请输入映射链接"></i-input>
			        </Form-item>
			        <Form-item label="映射行为" prop="action">
			            <i-input v-model="vueCopyForm.action" placeholder="请输入映射行为"></i-input>
			        </Form-item>
			        <Form-item label="分组" prop="group">
			        	<i-input v-model="vueCopyForm.group" placeholder="请输入分组信息"></i-input>
			        </Form-item>
			        <Form-item label="排序" prop="sort">
			        	<Input-number :max="9999" :min="0" v-model="vueCopyForm.sort" style="width: 100%"></Input-number>
			        </Form-item>
			        <Form-item label="资源类型" prop="resourceType">
			        	<Radio-group v-model="vueCopyForm.resourceType" type="button">
					        <Radio label="menu"><span>菜单</span></Radio>
					        <Radio label="button"><span>按钮</span></Radio>
					    </Radio-group>
			        </Form-item>
			        <Form-item label="可用状态" prop="available">
				        <i-switch v-model="vueCopyForm.available" size="large">
						    <span slot="open">启用</span>
						    <span slot="close">弃用</span>
						</i-switch>
			        </Form-item>
                </i-form>
                <div slot="footer">
                    <i-button type="primary" v-on:click="submitCopyForm()">提交</i-button>
                    <i-button type="primary" v-on:click="vueCopyModalVisible=false" style="margin-left:8px">取消</i-button>
                </div>
            </Modal>
	    	
		    <!-- 修改 -->
	    	<Modal width="600" v-model="vueUpdateModalVisible" :styles="{top: '50px'}" title="修改权限">
			    <i-form ref="vueUpdateForm" :model="vueUpdateForm" :rules="vueUpdateFormRules" :label-width="80">
			    	<Form-item label="名称" prop="name">
			            <i-input v-model="vueUpdateForm.name" placeholder="请输入名称"></i-input>
			        </Form-item>
			        <Form-item label="上级节点" prop="parentId">
			            <Input-number :max="9999" :min="0" v-model="vueUpdateForm.parentId" style="width: 100%"></Input-number>
			        </Form-item>
			        <Form-item label="映射链接" prop="url">
			            <i-input v-model="vueUpdateForm.url" placeholder="请输入映射链接"></i-input>
			        </Form-item>
			        <Form-item label="映射行为" prop="action">
			            <i-input v-model="vueUpdateForm.action" placeholder="请输入映射行为"></i-input>
			        </Form-item>
			        <Form-item label="分组" prop="group">
			        	<i-input v-model="vueUpdateForm.group" placeholder="请输入分组信息"></i-input>
			        </Form-item>
			        <Form-item label="排序" prop="sort">
			        	<Input-number :max="9999" :min="0" v-model="vueUpdateForm.sort" style="width: 100%"></Input-number>
			        </Form-item>
			        <Form-item label="资源类型" prop="resourceType">
			        	<Radio-group v-model="vueUpdateForm.resourceType" type="button">
					        <Radio label="menu"><span>菜单</span></Radio>
					        <Radio label="button"><span>按钮</span></Radio>
					    </Radio-group>
			        </Form-item>
			        <Form-item label="可用状态" prop="available">
					    <i-switch v-model="vueUpdateForm.available" size="large">
						    <span slot="open">启用</span>
						    <span slot="close">弃用</span>
						</i-switch>
			        </Form-item>
			    </i-form>
		    	<!-- 自定义 modal 底部按钮 -->
			    <div slot="footer">
			     	<i-button type="primary"  v-on:click="submitUpdateForm()">提交</i-button>
		            <i-button type="primary"  v-on:click="vueUpdateModalVisible = false"  style="margin-left: 8px">取消</i-button>
		        </div>
	    	</Modal>
	    	
	    	<div th:replace="fragment/admin_content_delete_modal"></div>
	    	<Back-top />
		</div>
		<div th:replace="fragment/admin_content_scripts"></div>
	 	<script th:src="@{/static/js/business/permission-biz.js}"></script>
	</body>
</html>